CoolCounter ActiveX Control

CoolCounter ActiveX Control,

Create colorful, animated counters with optional live Internet updates.

The CoolCounter ActiveX Control allows you to create animated counters in your Visual Basic or Web application. When a counters value changes its digits are animated to reflect the change. You can specify sounds (WAV files) that will be played each time a digit changes. The control exports a large set of properties allowing you to customize the font, color and shape of the counter. You can also specify to which direction the digits rotate and at what speed. Counters can also be connected to a CGI program running on the web to receive live updates. You can use  CoolCounter to display status information in a much more attractive way.

CoolCounter can be used locally (no Internet connection) or to receive live Internet updates.

Local Updates

When local mode is used you can set the value of the counter yourself. You can connect any of your data sources to reflect a value in an attractive way. No Internet connection is required.

Internet Updates

When Internet mode is used you need to have an active connection to the Internet. There are currently four properties all starting with the prefix “Web…”, allowing you to customize the way the control works. Working in Internet mode requires a CGI script to run on a remote web server. We have added a sample PERL script that creates a simple counter (the script can be found at the \Program Files\CoolCounter\Web directory). This remote counter is then used by the local CoolCounter to receive live updates. (Check out the “VB4  Web Example” application  provided with this software).

Limitations:

The Internet capabilities of the CoolCounter control will not function in case the client  needs a proxy in order to connect to the Internet .

CoolCounter Properties and Methods.


CoolCounter API

Properties

Value

DigitCount

DigitSpeed

DigitDelay

ForeColor

BackColor

DigitBackColor

DigitFont

DigitSideMargin

DigitTopMargin

DigitChangingSound

DigitChangedSound

DigitsMoveUp

Web Related Properties

WebEnable

WebServerIP

WebCounterURL

WebUpdateInterval

Methods

Add

Subtract

Value As Long

Default property. This property us used to set/get the current value of the CoolCounter.


DigitCount As Long

Specifies the number of digits displayed by the counter. You can set this value to increase or decrease the number of counter digits. Valid ranges are between one and one hundred.


DigitSpeed As Long

Specifies the speed in which digits are animated. The higher this number the bigger the jumps in which the digit moves. Increase this value to decrease the amount of CPU resources the counter consumes.


DigitDelay As Long

Specifies the delay in milliseconds of the digit in each new position. The higher this number the longer it will take for the digit to finish it’s movement. Decrease this value to decrease the amount of CPU resources the counter consumes.


ForeColor As OLE_COLOR

This property enables you to set the color of the digits displayed in the counter.


BackColor As OLE_COLOR

This property enables you to set the background color of the counter.


DigitBackColor As OLE_COLOR

This property enables you to set the digit background color displayed in the counter.


DigitFont

This property enables you to set the font displayed by the counter.


DigitChangedSound As String

This property allows you to specify the full path to a WAV file which will be played each time a digit has changed. Set this property to an empty string (“”) in order to disable the digit changed sound.


DigitChangingSound As String

This property allows you to specify the full path to a WAV file which will be played each time a digit is changing. Set this property to an empty string (“”) in order to disable the digit changing sound. The sound is played while the digit moves.


DigitSideMargin As Long

This property allows you to specify the margins left and right of each digit.


DigitTopMargin As Long

This property allows you to specify the below and above of each digit.


DigitsMoveUp As Boolean

This property allows you to specify if the digits are animated from bottom to top or the other way. A value of TRUE specifies that digits will move from bottom to top.


WebEnable As Boolean

This property allows you to connect the CoolCounter control to a live Internet data source. Usually this data source is a CGI program running on a web server. Setting this property to TRUE will cause the control to start reflecting the value returned by the CGI program (see the WebCounterURL property).  In order to stop the counter from updating set this property to FALSE. If you are writing the CGI program that returns the counter value you need to return a number in the form of plain/text.


WebServerIP As String

This property allows you to specify the web server address where the CGI counter is located. (e.g.: www.4developers.com).


WebCounterURL As String

This property allows you to specify the URL of the CGI program that returns the value for the CoolCounter.  (e.g.: /cgi_bin/counter.cgi). If you are writing the CGI program that returns the counter value you need to return a number in the form of plain/text.


WebUpdateInterval As Long

This property allows you to specify the rate in which the CoolCounter will update. The property specifies the number of seconds between each check that the CoolCounter makes in order to see if the real value on the remote server has changed. Increase this value to reduce the amount of network traffic the counter causes. If the value obtained from the remote CGI program is the same as in the CoolCounter it will change anything.


Add(HowMuch As Long)

This method allows you to add to the counter value. You can also use the Value property directly in order to change the counter value.


Subtract(HowMuch As Long)

This method allows you to subtract from the counter value. You can also use the Value property directly in order to change the counter value.